export default {
    namespaced: true,
    state: {
        history: [
            {
                path: '/home/',
                meta: { name: '靶场管理' }
            }
        ]
    },
    mutations: {
        addRan(state, payload) {
            // console.log('-------------mutation 下的addTabs------------');
            const isHash = state.history.some(item => {
                return item.path == payload.path
            })
            if (!isHash) {
                state.history.push(payload)
            }
        },
        removeTabs(state, payload) {
            state.history.splice(payload, 1)
        }
    }
}